package string;

public class MatchesDemo {
    public static void main(String[] args) {
        String email="luxinyu111@qq.cn";
        String regex="[a-zA-z0-9_]+@[a-zA-Z0-9]+(\\.[a-zA-Z]+)+";
        boolean match=email.matches(regex);
        if (match){
            System.out.println("对");
        }else{
            System.out.println("错");
        }
    }
}
